import 'package:flutter/cupertino.dart';

extension FFNumExt on num {
  Widget get widthSpace {
    return SizedBox(
      width: toDouble(),
    );
  }

  Widget get heightSpace {
    return SizedBox(
      height: toDouble(),
    );
  }

  Widget get flex {
    return Expanded(
      flex: toInt(),
      child: Container(),
    );
  }

  int get toINT {
    return toInt();
  }

  double get toDOUBLE {
    return toDouble();
  }
}

extension FFNumExt2 on num? {
  int get toINT {
    if (this == null) return 0;
    return this!.toINT;
  }

  double get toDOUBLE {
    if (this == null) return 0;
    return this!.toDouble();
  }
}
